package com.xiangyi.teachingsystem.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ShortMsg {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @NotNull(message = "发信人sendId不能为空")
    private Integer sendId;
    @NotNull(message = "收信人acceptId不能为空")
    private Integer acceptId;
    @NotNull(message = "信息内容msg不能为空")
    private String msg;
    @NotNull(message = "发信时间msgTime不能为空")
    private Timestamp msgTime;
    @NotNull(message = "msgSpace不能为空")
    private String msgSpace;

    @TableField(exist = false)
    private String sendName;
    @TableField(exist = false)
    private String sendUrl;
}
